package com.yyg.usecase;

import java.util.Objects;

public class AuthService {

    private ServiceProperties serviceProperties;

    public AuthService(ServiceProperties serviceProperties) {
        this.serviceProperties = serviceProperties;
    }

    public boolean isAdmin(String userId) {
        String realAdmin = serviceProperties.getAdminUserId();
        return Objects.nonNull(realAdmin) && Objects.equals(realAdmin, userId);
    }

}
